#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <qmainwindow.h>
#include <QWorkspace>

		
class QAction;
class CScreenW;		
class CSpritesW;
class QCloseEvent;


class CMainWindow: public QMainWindow
{
	Q_OBJECT

	public:
		CMainWindow();

	protected:

		
	private slots:
		void OnNewProject();
		void OnLoadProject();
		void OnSaveProject();
		void OnSaveAsProject();
		void OnCloseProject();
		void OnQuit();
				
		void OnNewScreen();
		void OnLoadScreen();
		void OnSaveScreen();
		void OnSaveAsScreen();
		void OnExportScreen();
		
		void OnNewTiles();
		void OnLoadTiles();
		void OnSaveTiles();
		void OnSaveAsTiles();
		void OnExportTiles();

		void OnNewSprites();
		void OnLoadSprites();
		void OnSaveSprites();
		void OnSaveAsSprites();
		void OnCloseSprites();		
		void OnExportSprites();
		
		void OnAbout();
		
	private:
		void EnableMenuItems();

		QString m_ProjectFile;
		QString m_ScreenFile;
		QString m_TilesFile;
		QString m_SpritesFile;
		
		
		QAction *m_pActNewProject;
		QAction *m_pActLoadProject;
		QAction *m_pActSaveProject;
		QAction *m_pActSaveAsProject;
		QAction *m_pActCloseProject;
		QAction *m_pActQuit;
		
		QAction *m_pActNewScreen;
		QAction *m_pActLoadScreen;
		QAction *m_pActSaveScreen;
		QAction *m_pActSaveAsScreen;
		QAction *m_pActExportScreen;
		
		QAction *m_pActNewTiles;
		QAction *m_pActLoadTiles;
		QAction *m_pActSaveTiles;
		QAction *m_pActSaveAsTiles;
		QAction *m_pActExportTiles;
		
		QAction *m_pActNewSprites;
		QAction *m_pActLoadSprites;
		QAction *m_pActSaveSprites;
		QAction *m_pActSaveAsSprites;
		QAction *m_pActCloseSprites;
		QAction *m_pActExportSprites;
		
		QAction *m_pActAbout;
		
		QMenu *m_pMenu;
	
		QWorkspace *m_pWks;
		CScreenW *m_pScreen;
		CSpritesW *m_pSprites;

		void SaveProject();
};
#endif
